// pages/musicInfo/musicInfo.js
const app = getApp()
import request from '../../../utils/http.js'
Page({

  /**
   * 页面的初始数据
   */
  data: {
    toWhoStr: '',
    toWhoFlag: false,
    index3Key: 0,
    MusicgenreStr: '',
    index4Key: 0,
    toTypeStr: '',
    toTypeFlag: false,
    index5Key: 0,
    EnglishStr: '',
    EnglishFlag: false,
    index6Key: 0,
    PuremusicStr: '',
    PuremusicFlag: false,
    index7Key: 0,
    toAuthStr: '',
    toAuthFlag: false,
    index8Key: 0,
    toMusicStr: '',
    toMusicFlag: false,
    index9Key: 0,
    toFeelStr: '',
    toFeelFlag: false,
    index10Key: 0,
    toMelodyStr: '',
    toMelodyFlag: false,
    index11Key: 0,
    toThemeStr: '',
    toThemeFlag: false,
    index12Key: 0,
    toOccStr: '',
    toOccFlag: false,
    index13Key: 0,
    toStoryStr: '',
    toStoryFlag: false,
    index14Key: 0.,
    toContentStr: '',
    toContentFlag: false,
    index15Key: 0,
    toWordStr: '',
    toWordFlag: false,
    index16Key: 0,
    toTimeStr: '',
    toTimeFlag: false,
    index17Key: 0,
    toTasteStr: '',
    index18Key: 0,
    toBlackGStr: '',
    index19Key: 0,

    baoCunZhuangTai: '',


  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

    this.getInfomusic()
  },

  getInfomusic() {
    var that = this
    var data = {}
    request.get('music/getInfo', null, res => {
      wx.hideLoading()
      console.log("获取歌曲信息:" + JSON.stringify(res.data))
      that.setData({
        baoCunZhuangTai: res.data.baoCunZhuangTai,
        index3Key: res.data.index3Key == null ? 0 : res.data.index3Key,
        toWhoStr: res.data.index3Value == null ? "" : res.data.index3Value,
        index4Key: res.data.index4Key == null ? "" : res.data.index4Key,
        MusicgenreStr: res.data.index4Value == null ? 0 : res.data.index4Value,
        index5Key: res.data.index5Key == null ? 0 : res.data.index5Key,
        toTypeStr: res.data.index5Value == null ? "" : res.data.index5Value,
        index6Key: res.data.index6Key == null ? 0 : res.data.index6Key,
        EnglishStr: res.data.index6Value == null ? 0 : res.data.index6Value,
        index7Key: res.data.index7Key == null ? 0 : res.data.index7Key,
        PuremusicStr: res.data.index7Value == null ? "" : res.data.index7Value,
        index8Key: res.data.index8Key == null ? 0 : res.data.index8Key,
        toAuthStr: res.data.index8Value == null ? "" : res.data.index8Value,
        index9Key: res.data.index9Key == null ? 0 : res.data.index9Key,
        toMusicStr: res.data.index9Value == null ? "" : res.data.index9Value,
        index10Key: res.data.index10Key == null ? 0 : res.data.index10Key,
        toFeelStr: res.data.index10Value == null ? "" : res.data.index10Value,
        toMelodyStr: res.data.index11Value == null ? "" : res.data.index11Value,
        index11Key: res.data.index11Key == null ? 0 : res.data.index11Key,
        index12Key: res.data.index12Key == null ? 0 : res.data.index12Key,
        toThemeStr: res.data.index12Value == null ? "" : res.data.index12Value,
        index13Key: res.data.index13Key == null ? 0 : res.data.index13Key,
        toOccStr: res.data.index13Value == null ? "" : res.data.index13Value,
        index14Key: res.data.index14Key == null ? 0 : res.data.index14Key,
        toStoryStr: res.data.index14Value == null ? "" : res.data.index14Value,
        index15Key: res.data.index15Key == null ? 0 : res.data.index15Key,
        toContentStr: res.data.index15Value == null ? "" : res.data.index15Value,
        index16Key: res.data.index16Key == null ? 0 : res.data.index16Key,
        toWordStr: res.data.index16Value == null ? "" : res.data.index16Value,
        index17Key: res.data.index17Key == null ? 0 : res.data.index17Key,
        toTimeStr: res.data.index17Value == null ? "" : res.data.index17Value,
        index18Key: res.data.index18Key == null ? 0 : res.data.index18Key,
        toTasteStr: res.data.index18Value == null ? "" : res.data.index18Value,
        index19Key: res.data.index19Key == null ? 0 : res.data.index19Key,
        toBlackGStr: res.data.index19Value == null ? "" : res.data.index19Valu,

      })
      if (res.data.index3Key == 5) {
        that.setData({
          toWhoFlag: true
        });
      }
      if (res.data.index5Key == 8) {
        that.setData({
          toTypeFlag: true
        });
      }
      if (res.data.index6Key == 8) {
        that.setData({
          EnglishFlag: true
        });
      }
      if (res.data.index7Key == 6) {
        that.setData({
          PuremusicFlag: true
        });
      }
      if (res.data.index8Key == 2) {
        that.setData({
          toAuthFlag: true
        });
      }
      if (res.data.index9Key == 2) {
        that.setData({
          toMusicFlag: true
        });
      }
      if (res.data.index10Key == 4) {
        that.setData({
          toFeelFlag: true
        });
      }
      if (res.data.index11Key == 2) {
        that.setData({
          toMelodyFlag: true
        });
      }
      if (res.data.index12Key == 5) {
        that.setData({
          toThemeFlag: true
        });
      }
      if (res.data.index13Key == 3) {
        that.setData({
          toOccFlag: true
        });
      }
      if (res.data.index14Key == 2) {
        that.setData({
          toStoryFlag: true
        });
      }
      if (res.data.index15Key == 2) {
        that.setData({
          toContentFlag: true
        });
      }
      if (res.data.index16Key == 2) {
        that.setData({
          toWordFlag: true
        });
      }

      if (res.data.index17Key == 3) {
        that.setData({
          toTimeFlag: true
        });
      }
      if (res.data.index4Key === '1') {
        that.setData({
          showChineseStyle: true,
          showEnglishStyle: false,
          showPureMusicStyle: false,
          showtoContentStyle: true,
          showtoWordStyle: true,
        });
      } else if (res.data.index4Key === '2') {
        that.setData({
          showChineseStyle: false,
          showEnglishStyle: true,
          showPureMusicStyle: false,
          showtoContentStyle: true,
          showtoWordStyle: true,
        });
      } else if (res.data.index4Key === '3') {
        that.setData({
          showChineseStyle: false,
          showEnglishStyle: false,
          showPureMusicStyle: true,
          showtoContentStyle: false,
          showtoWordStyle: false,
        });
      }

    })
  },

  updateInfo() {

 

      var that = this

      var data = {
        baoCunZhuangTai: 2,
        index3Value: that.data.toWhoStr,
        index3Key: that.data.index3Key,
        index4Value: that.data.MusicgenreStr,
        index4Key: that.data.index4Key,
        index5Value: that.data.toTypeStr,
        index5Key: that.data.index5Key,
        index6Value: that.data.EnglishStr,
        index6Key: that.data.index6Key,
        index7Value: that.data.PuremusicStr,
        index7Key: that.data.index7Key,
        index8Value: that.data.toAuthStr,
        index8Key: that.data.index8Key,
        index9Value: that.data.toMusicStr,
        index9Key: that.data.index9Key,
        index10Value: that.data.toFeelStr,
        index10Key: that.data.index10Key,
        index11Value: that.data.toMelodyStr,
        index11Key: that.data.index11Key,
        index12Value: that.data.toThemeStr,
        index12Key: that.data.index12Key,
        index13Value: that.data.toOccStr,
        index13Key: that.data.index13Key,
        index14Value: that.data.toStoryStr,
        index14Key: that.data.index14Key,
        index15Value: that.data.toContentStr,
        index15Key: that.data.index15Key,
        index16Value: that.data.toWordStr,
        index16Key: that.data.index16Key,
        index17Value: that.data.toTimeStr,
        index17Key: that.data.index17Key,
        index18Value: that.data.toTasteStr,
        index18Key: that.data.index18Key,
        index19Value: that.data.toBlackGStr,
        index19Key: that.data.index19Key,
      }


      wx.showModal({
        title: '提交确认',
        content: '提交后不可以再修改，是否确认提交？',
        showCancel: true,
        cancelText: '取消',
        confirmText: '确定',
        success: function (res) {
          if (res.confirm) {
            wx.showLoading({
              title: '提交中...',
              mask: true
            })

            request.get('music/updateInfo', data, res => {
              wx.hideLoading()
              console.log("更新歌曲需求:" + JSON.stringify(res.data))
              if (res.data.status == 1) {
                wx.showToast({
                  title: '提交成功!!!',
                  icon: 'success',
                  duration: 2000 // 显示2秒后自动消失
                });

              } else {
                wx.showToast({
                  title: '提交失败',
                  icon: 'success',
                  duration: 2000 // 显示2秒后自动消失
                });
              }
            })
          } else if (res.cancel) {
            wx.showToast({
              title: '已取消',
              icon: 'success',
              duration: 2000 // 显示2秒后自动消失
            });
            return;
          }
        }
      });


  },

  updateInfoTemp(e) {

    wx.showLoading({
      title: '保存中...',
      mask: true
    })

    var that = this

    var data = {
      baoCunZhuangTai: 1,
      index3Value: that.data.toWhoStr,
      index3Key: that.data.index3Key,
      index4Value: that.data.MusicgenreStr,
      index4Key: that.data.index4Key,
      index5Value: that.data.toTypeStr,
      index5Key: that.data.index5Key,
      index6Value: that.data.EnglishStr,
      index6Key: that.data.index6Key,
      index7Value: that.data.PuremusicStr,
      index7Key: that.data.index7Key,
      index8Value: that.data.toAuthStr,
      index8Key: that.data.index8Key,
      index9Value: that.data.toMusicStr,
      index9Key: that.data.index9Key,
      index10Value: that.data.toFeelStr,
      index10Key: that.data.index10Key,
      index11Value: that.data.toMelodyStr,
      index11Key: that.data.index11Key,
      index12Value: that.data.toThemeStr,
      index12Key: that.data.index12Key,
      index13Value: that.data.toOccStr,
      index13Key: that.data.index13Key,
      index14Value: that.data.toStoryStr,
      index14Key: that.data.index14Key,
      index15Value: that.data.toContentStr,
      index15Key: that.data.index15Key,
      index16Value: that.data.toWordStr,
      index16Key: that.data.index16Key,
      index17Value: that.data.toTimeStr,
      index17Key: that.data.index17Key,
      index18Value: that.data.toTasteStr,
      index18Key: that.data.index18Key,
      index19Value: that.data.toBlackGStr,
      index19Key: that.data.index19Key,
    }


    request.get('music/updateInfo', data, res => {
      wx.hideLoading()
      console.log("更新歌曲需求:" + JSON.stringify(res.data))
      if (res.data.status == 1) {
        wx.showToast({
          title: '已存为草稿',
          icon: 'success',
          duration: 2000 // 显示2秒后自动消失
        });
      } else {
        wx.showToast({
          title: '保存失败',
          icon: 'success',
          duration: 2000 // 显示2秒后自动消失
        });
      }
    })


  },



  isReady() {

    var temp = true
    if (this.data.toWhoStr == "" || this.data.index3Key == 0) {
      temp = false
    }
    if (this.data.MusicgenreStr == 0 || this.data.index4Key == 0) {
      temp = false
    }

    if (this.data.index4Key == 1 && (this.data.toTypeStr == "" || this.data.toTypeStr == null)) {
      temp = false
    }
    if (this.data.index4Key == 2 && (this.data.EnglishStr == "" || this.data.EnglishStr == null)) {
      temp = false
    }
    if (this.data.index4Key == 3 && (this.data.PuremusicStr == "" || this.data.PuremusicStr == null)) {
      temp = false
    }

    if (this.data.index8Key == 0 || (this.data.index8Key == 2 && this.data.toAuthStr == "")) {
      temp = false
    }

    if (this.data.index9Key == 0 || (this.data.index9Key == 2 && this.data.toMusicStr == "")) {
      temp = false
    }

    if (this.data.index10Key == 0 || (this.data.index10Key == 4 && this.data.toFeelStr == "")) {
      temp = false
    }

    if (this.data.index11Key == 0 || (this.data.index11Key == 2 && this.data.toMelodyStr == "")) {
      temp = false
    }

    if (this.data.index12Key == 0 || (this.data.index12Key == 5 && this.data.toThemeStr == "")) {
      temp = false
    }
    if (this.data.index13Key == 0 || (this.data.index13Key == 3 && this.data.toOccStr == "")) {
      temp = false
    }

    if (this.data.index14Key == 0 || (this.data.index14Key == 2 && this.data.toStoryStr == "")) {
      temp = false
    }

    if ((this.data.index4Key == 1 || this.data.index4Key == 2) && ((this.data.index15Key == 0 || this.data.index16Key == 0) || (this.data.index15Key == 2 && this.data.toContentStr == '') || (this.data.index16Key == 2 && this.data.toWordStr == ''))) {
      temp = false
    }

    if (this.data.toTimeStr == "" || this.data.index17Key == 0) {
      temp = false
    }

    if(temp){
      this.updateInfo()
    }  else {
      wx.showToast({
        title: "还有必填项未填写！", // 提示的内容
        icon: "none", // 图标，默认success
        duration: 3000, // 提示的延迟时间，默认1500
        mask: false, // 是否显示透明蒙层，防止触摸穿透
      })
      return;
    }

  },



  //问题1
  toWhoChange(e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    var tempStr = '';
    var id = e.detail.value;
    switch (id) {
      case "1":
        tempStr = "歌曲献给：父母"
        break;
      case "2":
        tempStr = "歌曲献给：子女"
        break;

      case "3":
        tempStr = "歌曲献给：爱人"
        break;

      case "4":
        tempStr = "歌曲献给：朋友"
        break;

      case "5":
        tempStr = ""
        break;
      default:
        break;
    }

    this.setData({
      index3Key: id,
      toWhoStr: tempStr,
      toWhoFlag: e.detail.value == 5 ? true : false
    })
  },

  toWhoInput: function (e) {
    console.log(e.detail.value)
    this.setData({
      toWhoStr: '歌曲献给：' + e.detail.value
    })
  },


  //问题2
  Musicgenre(e) {
    console.log('picker发送选择改变，携带值为', e.detail.value)
    var tempStr = '';
    var id = e.detail.value;
    switch (id) {
      case "1":
        tempStr = "音乐类型：中文歌曲"
        this.setData({
          index4Key: id,
          MusicgenreStr: tempStr,
          showChineseStyle: true,
          showEnglishStyle: false,
          showPureMusicStyle: false,
          showtoContentStyle: true,
          showtoWordStyle: true,
        });
        break;
      case "2":
        tempStr = "音乐类型：英文歌曲"
        this.setData({
          index4Key: id,
          MusicgenreStr: tempStr,
          showChineseStyle: false,
          showEnglishStyle: true,
          showPureMusicStyle: false,
          showtoContentStyle: true,
          showtoWordStyle: true,
        });
        break;
      case "3":
        tempStr = "音乐类型：纯音乐（无人声）"
        this.setData({
          index4Key: id,
          MusicgenreStr: tempStr,
          showChineseStyle: false,
          showEnglishStyle: false,
          showPureMusicStyle: true,
          showtoContentStyle: false,
          showtoWordStyle: false,
        });
        break;
      default:
        break;
    }

    // this.setData({
    //   index4Key:id,
    //   MusicgenreStr:tempStr,
    // })
  },




  //问题3
  toTypeChange(e) {
    var tempStr = '';
    var id = e.detail.value;
    switch (id) {
      case "1":
        tempStr = "类型喜欢：流行"
        break;
      case "2":
        tempStr = "类型喜欢：摇滚"
        break;

      case "3":
        tempStr = "类型喜欢：儿歌"
        break;

      case "4":
        tempStr = "类型喜欢：爵士"
        break;

      case "5":
        tempStr = "类型喜欢：民谣"
        break;

      case "6":
        tempStr = "类型喜欢：古风"
        break;

      case "7":
        tempStr = "类型喜欢：电子"
        break;

      case "8":
        tempStr = ""
        break;
      default:
        break;
    }

    this.setData({
      index5Key: id,
      toTypeStr: tempStr,
      toTypeFlag: e.detail.value == 8 ? true : false
    })

  },
  toTypeInput: function (e) {
    this.setData({
      toTypeStr: '类型喜欢：' + e.detail.value
    })
  },


  //问题4
  EnglishChange(e) {
    var tempStr = '';
    var id = e.detail.value;
    switch (id) {
      case "1":
        tempStr = "类型喜欢：流行"
        break;
      case "2":
        tempStr = "类型喜欢：摇滚"
        break;

      case "3":
        tempStr = "类型喜欢：古典"
        break;

      case "4":
        tempStr = "类型喜欢：爵士"
        break;

      case "5":
        tempStr = "类型喜欢：民谣"
        break;

      case "6":
        tempStr = "类型喜欢：电子"
        break;

      case "7":
        tempStr = "类型喜欢：儿歌"
        break;

      case "8":
        tempStr = ""
        break;
      default:
        break;
    }

    this.setData({
      index6Key: id,
      EnglishStr: tempStr,
      EnglishFlag: e.detail.value == 8 ? true : false
    })



  },
  EnglishInput: function (e) {
    this.setData({
      EnglishStr: '类型喜欢：' + e.detail.value
    })
  },


  //问题5

  PuremusicChange(e) {
    var tempStr = '';
    var id = e.detail.value;
    switch (id) {
      case "1":
        tempStr = "类型喜欢：轻音乐"
        break;
      case "2":
        tempStr = "类型喜欢：古典"
        break;

      case "3":
        tempStr = "类型喜欢：爵士"
        break;

      case "4":
        tempStr = "类型喜欢：民乐"
        break;

      case "5":
        tempStr = "类型喜欢：电子"
        break;

      case "6":
        tempStr = ""
        break;
      default:
        break;
    }

    this.setData({
      index7Key: id,
      PuremusicStr: tempStr,
      PuremusicFlag: e.detail.value == 6 ? true : false
    })

  },
  PuremusicInput: function (e) {
    this.setData({
      PuremusicStr: '类型喜欢：' + e.detail.value
    })
  },

  //问题6
  toAuthChange(e) {
    var tempStr = '';
    var id = e.detail.value;

    switch (id) {
      case "1":
        tempStr = "歌手喜欢：不，我没有喜欢的歌手或歌曲专辑推荐"
        break;
      case "2":
        tempStr = ""
        break;

      default:
        break;
    }

    this.setData({
      index8Key: id,
      toAuthStr: tempStr,
      toAuthFlag: e.detail.value == 2 ? true : false
    })

  },
  toAuthInput: function (e) {
    var temp = e.detail.value
    if (temp != "") {
      temp = '歌手喜欢：' + temp
    }
    this.setData({
      toAuthStr: temp
    })
  },



  //问题7
  toMusicChange(e) {
    var tempStr = '';
    var id = e.detail.value;
    switch (id) {
      case "1":
        tempStr = "音乐喜欢：不，我没有喜欢的歌手或歌曲专辑推荐"
        break;
      case "2":
        tempStr = "音乐喜欢：是的，我喜欢"
        break;

      default:
        break;
    }

    this.setData({
      index9Key: id,
      toMusicStr: tempStr,
      toMusicFlag: e.detail.value == 2 ? true : false
    })

  },
  toMusicInput: function (e) {
    var temp = e.detail.value
    if (temp != "") {
      temp = '音乐喜欢：' + temp
    }
    this.setData({
      toMusicStr: temp
    })

  },
  //问题8


  toFeelChange(e) {
    var tempStr = '';
    var id = e.detail.value;

    switch (id) {
      case "1":
        tempStr = "曲风：抒情"
        break;
      case "2":
        tempStr = "曲风:欢快"
        break;

      case "3":
        tempStr = "曲风:动感"
        break;

      case "4":
        tempStr = ""
        break;
      default:
        break;
    }

    this.setData({
      index10Key: id,
      toFeelStr: tempStr,
      toFeelFlag: e.detail.value == 4 ? true : false
    })


  },
  toFeelInput: function (e) {

    var temp = e.detail.value
    if (temp != "") {
      temp = '曲风：' + temp
    }
    this.setData({
      toFeelStr: temp
    })


  },

  //问题9
  toMelodyChange(e) {
    var tempStr = '';
    var id = e.detail.value;

    switch (id) {
      case "1":
        tempStr = "节奏旋律：不，我对歌曲的节奏和旋律没有偏好"
        break;
      case "2":
        tempStr = ""
        break;

      default:
        break;
    }

    this.setData({
      index11Key: id,
      toMelodyStr: tempStr,
      toMelodyFlag: e.detail.value == 2 ? true : false
    })

  },
  toMelodyInput: function (e) {

    var temp = e.detail.value
    if (temp != "") {
      temp = '节奏旋律：' + temp
    }
    this.setData({
      toMelodyStr: temp
    })

  },

  //问题10
  toThemeChange(e) {
    var tempStr = '';
    var id = e.detail.value;

    switch (id) {
      case "1":
        tempStr = "主题：生日祝福"
        break;
      case "2":
        tempStr = "主题：爱意表达"
        break;

      case "3":
        tempStr = "主题：父母之爱"
        break;

      case "4":
        tempStr = "主题：养育之恩"
        break;

      case "5":
        tempStr = ""
        break;
      default:
        break;
    }

    this.setData({
      index12Key: id,
      toThemeStr: tempStr,
      toThemeFlag: e.detail.value == 5 ? true : false
    })


  },
  toThemeInput: function (e) {

    var temp = e.detail.value
    if (temp != "") {
      temp = '主题：' + temp
    }
    this.setData({
      toThemeStr: temp
    })

  },

  //问题11

  toOccChange(e) {
    var tempStr = '';
    var id = e.detail.value;
    console.log(id)

    switch (id) {
      case "1":
        tempStr = "场合：亲朋聚会"
        break;
      case "2":
        tempStr = "场合：企业活动"
        break;

      case "3":
        tempStr = ""
        break;

      default:
        break;
    }

    this.setData({
      index13Key: id,
      toOccStr: tempStr,
      toOccFlag: e.detail.value == 3 ? true : false
    })

  },

  toOccInput: function (e) {

    var temp = e.detail.value
    if (temp != "") {
      temp = '场合：' + temp
    }
    this.setData({
      toOccStr: temp
    })

  },


  //问题12
  toStoryChange(e) {
    var tempStr = '';
    var id = e.detail.value;

    switch (id) {
      case "1":
        tempStr = "主体故事:不，我没有特定的主体或故事想要在歌曲中体现"
        break;
      case "2":
        tempStr = ""
        break;

      default:
        break;
    }

    this.setData({
      index14Key: id,
      toStoryStr: tempStr,
      toStoryFlag: e.detail.value == 2 ? true : false
    })

  },
  toStoryInput: function (e) {

    var temp = e.detail.value
    if (temp != "") {
      temp = '主体故事：' + temp
    }
    this.setData({
      toStoryStr: temp
    })
  },



  //问题13
  toContentChange(e) {
    var tempStr = '';
    var id = e.detail.value;

    switch (id) {
      case "1":
        tempStr = "价值内容：不，我没有想传达的特定信息和价值观"
        break;
      case "2":
        tempStr = ""
        break;

      default:
        break;
    }

    this.setData({
      index15Key: id,
      toContentStr: tempStr,
      toContentFlag: e.detail.value == 2 ? true : false
    })

  },
  toContentInput: function (e) {


    var temp = e.detail.value
    if (temp != "") {
      temp = '价值内容：' + temp
    }
    this.setData({
      toContentStr: temp
    })

  },


  //问题14
  toWordChange(e) {
    var tempStr = '';
    var id = e.detail.value;

    switch (id) {
      case "1":
        tempStr = "歌词：不，我对歌词的内容没有具体要求"
        break;
      case "2":
        tempStr = ""
        break;

      default:
        break;
    }

    this.setData({
      index16Key: id,
      toWordStr: tempStr,
      toWordFlag: e.detail.value == 2 ? true : false
    })
  },
  toWordInput: function (e) {



    var temp = e.detail.value
    if (temp != "") {
      temp = '歌词：' + temp
    }
    this.setData({
      toWordStr: temp
    })

  },


  //问题15
  toTimeChange(e) {
    var tempStr = '';
    var id = e.detail.value;

    switch (id) {
      case "1":
        tempStr = "反馈时间：工作日上午"
        break;

      case "2":
        tempStr = "反馈时间：工作日下午"
        break;

      case "3":
        tempStr = ""
        break;

      default:
        break;
    }

    this.setData({
      index17Key: id,
      toTimeStr: tempStr,
      toTimeFlag: e.detail.value == 3 ? true : false
    })

  },
  toTimeInput: function (e) {

    var temp = e.detail.value
    if (temp != "") {
      temp = '反馈时间：' + temp
    }
    this.setData({
      toTimeStr: temp
    })

  },


  //问题16
  toTasteInput: function (e) {
    this.setData({
      index18Key: 1,
      toTasteStr: '歌曲/歌词的要求：' + e.detail.value
    })
  },

  //问题17
  toBlackGInput: function (e) {
    this.setData({
      index19Key: 1,
      toBlackGStr: '背景故事：' + e.detail.value
    })
  },



  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },


})